package io.gitee.zhangbinhub.admin.resource.server

import io.gitee.zhangbinhub.admin.resource.server.actuate.info.AcpAdminResourceServerDependenciesInfoContributor
import org.springframework.boot.actuate.autoconfigure.endpoint.EndpointAutoConfiguration
import org.springframework.boot.actuate.autoconfigure.info.ConditionalOnEnabledInfoContributor
import org.springframework.boot.actuate.info.InfoContributor
import org.springframework.boot.autoconfigure.AutoConfiguration
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass
import org.springframework.context.annotation.Bean

@AutoConfiguration(before = [EndpointAutoConfiguration::class])
@ConditionalOnClass(InfoContributor::class, ConditionalOnEnabledInfoContributor::class)
class AcpAdminResourceServerInfoAutoConfiguration {
    @Bean
    @ConditionalOnEnabledInfoContributor("acp-admin-cloud-dependencies-resource-server")
    fun acpAdminDependenciesResourceServerInfoContributor() = AcpAdminResourceServerDependenciesInfoContributor()
}